Skip to content

[#84]: Add v0.133.0 regression tests for TurnContextItem field trimming#88

Merged
delexw merged 2 commits into
mainfrom
fix-issue-84
Jun 3, 2026
Merged

[#84]: Add v0.133.0 regression tests for TurnContextItem field trimming#88
delexw merged 2 commits into
mainfrom
fix-issue-84

Conversation

@delexw
Copy link
Copy Markdown
Contributor

@delexw delexw commented May 31, 2026

Summary

Codex v0.133.0 (PR #22709) trimmed unused fields from the TurnContextItem session structure. The turn_context JSONL payload now carries only model; fields like cwd and effort may be absent in sessions from v0.133.0+.

The parser already handled this correctly — all fields are extracted via optional .get().and_then() chains in handle_turn_context, so missing fields silently produce None without panicking. turn.rs also already had targeted tests for pre- and post-v0.133.0 payloads (turn_context_with_extra_legacy_fields_does_not_panic, turn_context_with_missing_trimmed_fields_does_not_panic).

What was missing was a set of version-specific regression tests in entry.rs and session.rs to document the v0.133.0 change and provide coverage at the full-session parse level.

Changes

src-tauri/src/parser/entry.rs

  • v0133_turn_context_trimmed_payload_parses_as_turn_context_entry — verifies a minimal v0.133.0 turn_context (only model present) is parsed as turn_context entry type without panic
  • v0133_all_standard_entry_types_parse_correctly — regression guard ensuring all four standard JSONL entry types (session_meta, event_msg, response_item, turn_context) parse correctly under v0.133.0 with the trimmed payload

src-tauri/src/parser/session.rs

  • v0133_turn_context_trimmed_fields_session_parses_correctly — full session parse with a v0.133.0 turn_context (only model); verifies model is extracted, reasoning_effort is None, and the session parses without panic

Testing

All 134 Rust tests pass. All 128 frontend tests pass. Clippy and cargo fmt clean.

Fixes #84

delexw and others added 2 commits May 31, 2026 13:38
… trimming

Codex v0.133.0 (PR #22709) trimmed unused fields from TurnContextItem
session structure. The parser already handled this correctly (all fields
extracted via optional .get() chains), and turn.rs already had tests
for both pre- and post-v0.133.0 payloads.

This commit adds the missing version-specific regression tests to entry.rs
and session.rs to document the v0.133.0 change and guard against future
regressions:

- entry.rs: v0133_turn_context_trimmed_payload_parses_as_turn_context_entry
  verifies a minimal v0.133.0 turn_context (model only) parses without panic
- entry.rs: v0133_all_standard_entry_types_parse_correctly
  regression guard for all four standard JSONL entry types under v0.133.0
- session.rs: v0133_turn_context_trimmed_fields_session_parses_correctly
  full session parse with trimmed turn_context verifies model is extracted
  and missing cwd/effort fields are silently absent

Fixes #84
@delexw delexw merged commit 208310d into main Jun 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compat] Codex v0.133.0: TurnContextItem fields trimmed from session structure

2 participants